
<table border="1" cellpadding="3" cellspacing="0">
<tbody><tr class="alt">
<th colspan="4"><center>Public inheritance</center></th>
</tr>
<tr class="">
<th>Base access specifier</th>
<th>Derived access specifier</th>
<th>Derived class access?</th>
<th>Public access?</th>
</tr>
<tr class="alt">
<th>Public</th>
<td>Public</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr class="">
<th>Private</th>
<td>Private</td>
<td>No</td>
<td>No</td>
</tr>
<tr class="alt">
<th>Protected</th>
<td>Protected</td>
<td>Yes</td>
<td>No</td>
</tr>
</tbody></table>


<table border="1" cellpadding="3" cellspacing="0">
<tbody><tr class="">
<th colspan="4"><center>Private inheritance</center></th>
</tr>
<tr class="alt">
<th>Base access specifier</th>
<th>Derived access specifier</th>
<th>Derived class access?</th>
<th>Public access?</th>
</tr>
<tr class="">
<th>Public</th>
<td>Private</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr class="alt">
<th>Private</th>
<td>Private</td>
<td>No</td>
<td>No</td>
</tr>
<tr>
<th>Protected</th>
<td>Private</td>
<td>Yes</td>
<td>No</td>
</tr>
</tbody></table>


<table border="1" cellpadding="3" cellspacing="0">
<tbody><tr class="alt">
<th colspan="4"><center>Protected inheritance</center></th>
</tr>
<tr class="">
<th>Base access specifier</th>
<th>Derived access specifier</th>
<th>Derived class access?</th>
<th>Public access?</th>
</tr>
<tr class="alt">
<th>Public</th>
<td>Protected</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr class="">
<th>Private</th>
<td>Private</td>
<td>No</td>
<td>No</td>
</tr>
<tr class="alt">
<th>Protected</th>
<td>Protected</td>
<td>Yes</td>
<td>No</td>
</tr>
</tbody></table>
